package com.cwm.test.flyweight.general;

/**
 * 具体享元角色
 */
public class ConcreteFlyWeight implements IFlyWeight {

    private String intrinsicState;

    public ConcreteFlyWeight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void operation(String extrinsicstate) {
        System.out.println("object address: " + System.identityHashCode(this));
        System.out.println("Intrinsicstate:" + this.intrinsicState);
        System.out.println("Extrinsicstate:" + extrinsicstate);
    }
}
